package com.xiaoqi.store.entity;

import lombok.*;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author Rookie Coder
 * @Description 封装用户信息
 * @Date
 **/

@NoArgsConstructor
@ToString
@EqualsAndHashCode
@Getter
@Setter
public class UserEntity extends BaseEntity implements Serializable {

    private Integer uId;
    private String username;
    private String password;
    private String salt; // 用户盐值
    private String phone;
    private String email;
    private Integer gender;// 性别 1-男 0-女
    private String avatar;  // '头像'
    private Integer isDelete; //'是否删除：0-未删除，1-已删除'

    public UserEntity(String createdUser, Date createdTime, String modifiedUser, Date modifiedTime, Integer uId, String username, String password, String salt, String phone, String email, Integer gender, String avatar, Integer isDelete) {
        super(createdUser, createdTime, modifiedUser, modifiedTime);
        this.uId = uId;
        this.username = username;
        this.password = password;
        this.salt = salt;
        this.phone = phone;
        this.email = email;
        this.gender = gender;
        this.avatar = avatar;
        this.isDelete = isDelete;
    }

    public UserEntity(Integer uId, String username, String password, String salt, String phone, String email, Integer gender, String avatar, Integer isDelete) {
        this.uId = uId;
        this.username = username;
        this.password = password;
        this.salt = salt;
        this.phone = phone;
        this.email = email;
        this.gender = gender;
        this.avatar = avatar;
        this.isDelete = isDelete;
    }
}
